<?php

	$spotlight2_1 = array ('top1','top2','top3');
	$spotlight2_2 = array ('top4','top5','top6');
	
	$spotlight3_1 = array ('top7','top8','top9');
	$spotlight3_2 = array ('top10','top11','top12');
	
	$spotlight4_1 = array ('top13','top14','top15');
	$spotlight4_2 = array ('top16','top17','top18');
	
	$topsl1_1 = $this->calSpotlight ($spotlight2_1, 100);
	$topsl1_2 = $this->calSpotlight ($spotlight2_2, 100);
	
	$topsl2_1 = $this->calSpotlight ($spotlight3_1, 100);
	$topsl2_2 = $this->calSpotlight ($spotlight3_2, 100);
	
	$topsl3_1 = $this->calSpotlight ($spotlight4_1, 100);
	$topsl3_2 = $this->calSpotlight ($spotlight4_2, 100);
	
	if( $topsl1_1 || $topsl1_2 ) :

?>

<div id="gk-topsl1" class="clearfix">	
	<?php if( $this->countModules('top1 + top2 + top3') && $this->countModules('top4 + top5 + top6') ): ?>
	<div class="gk_top_half">
		<div>
	<?php endif; ?>
	
			<?php if( $this->countModules('top1') ): ?>
			<div class="gk-box column gk-box<?php echo $topsl1_1['top1']['class']; ?>" style="width: <?php echo $topsl1_1['top1']['width']; ?>;">
				<jdoc:include type="modules" name="top1" style="gavickpro" />
			</div>
			<?php endif; ?>
			
			<?php if( $this->countModules('top2') ): ?>
			<div class="gk-box column gk-box<?php echo $topsl1_1['top2']['class']; ?>" style="width: <?php echo $topsl1_1['top2']['width']; ?>;">
				<jdoc:include type="modules" name="top2" style="gavickpro" />
			</div>
			<?php endif; ?>
			
			<?php if( $this->countModules('top3') ): ?>
			<div class="gk-box column gk-box<?php echo $topsl1_1['top3']['class']; ?>" style="width: <?php echo $topsl1_1['top3']['width']; ?>;">
				<jdoc:include type="modules" name="top3" style="gavickpro" />
			</div>
			<?php endif; ?>
			
	<?php if($this->countModules('top1 + top2 + top3') && $this->countModules('top4 + top5 + top6')) : ?>
		</div>
	</div>
	<?php endif; ?>
	
	<?php if( $this->countModules('top1 + top2 + top3') && $this->countModules('top4 + top5 + top6') ): ?>
	<div class="gk_top_half">
		<div>
	<?php endif; ?>
			
			<?php if( $this->countModules('top4') ): ?>
			<div class="gk-box column gk-box<?php echo $topsl1_2['top4']['class']; ?>" style="width: <?php echo $topsl1_2['top4']['width']; ?>;">
				<jdoc:include type="modules" name="top4" style="gavickpro" />
			</div>
			<?php endif; ?>
			
			<?php if( $this->countModules('top5') ): ?>
			<div class="gk-box column gk-box<?php echo $topsl1_2['top5']['class']; ?>" style="width: <?php echo $topsl1_2['top5']['width']; ?>;">
				<jdoc:include type="modules" name="top5" style="gavickpro" />
			</div>
			<?php endif; ?>
			
			<?php if( $this->countModules('top6') ): ?>
			<div class="gk-box column gk-box<?php echo $topsl1_2['top6']['class']; ?>" style="width: <?php echo $topsl1_2['top6']['width']; ?>;">
				<jdoc:include type="modules" name="top6" style="gavickpro" />
			</div>
			<?php endif; ?>
			
	<?php if( $this->countModules('top1 + top2 + top3') && $this->countModules('top4 + top5 + top6') ): ?>
		</div>
	</div>
	<?php endif; ?>	
	
	<?php if($this->_tpl->params->get("css3") && $this->_tpl->params->get("topsl1_vtext") != '') : ?>
	<p class="vertical"><?php echo $this->_tpl->params->get("topsl1_vtext"); ?></p>
	<?php endif; ?>																				
</div>
<?php endif; ?>

<?php if( $topsl2_1 || $topsl2_2 ) : ?>
<div id="gk-topsl2" class="clearfix">	
	<?php if( $this->countModules('top7 + top8 + top9') && $this->countModules('top10 + top11 + top12') ): ?>
	<div class="gk_top_half">
		<div>
	<?php endif; ?>

		<?php if( $this->countModules('top7') ): ?>
		<div class="gk-box column gk-box<?php echo $topsl2_1['top7']['class']; ?>" style="width: <?php echo $topsl2_1['top7']['width']; ?>;">
			<jdoc:include type="modules" name="top7" style="gavickpro" />
		</div>
		<?php endif; ?>
		
		<?php if( $this->countModules('top8') ): ?>
		<div class="gk-box column gk-box<?php echo $topsl2_1['top8']['class']; ?>" style="width: <?php echo $topsl2_1['top8']['width']; ?>;">
			<jdoc:include type="modules" name="top8" style="gavickpro" />
		</div>
		<?php endif; ?>
		
		<?php if( $this->countModules('top9') ): ?>
		<div class="gk-box column gk-box<?php echo $topsl2_1['top9']['class']; ?>" style="width: <?php echo $topsl2_1['top9']['width']; ?>;">
			<jdoc:include type="modules" name="top9" style="gavickpro" />
		</div>
		<?php endif; ?>
	
	<?php if($this->countModules('top7 + top8 + top9') && $this->countModules('top10 + top11 + top12')) : ?>
		</div>
	</div>
	<?php endif; ?>
	
	<?php if( $this->countModules('top7 + top8 + top9') && $this->countModules('top10 + top11 + top12') ): ?>
	<div class="gk_top_half">
		<div>
	<?php endif; ?>
			
		<?php if( $this->countModules('top10') ): ?>
		<div class="gk-box column gk-box<?php echo $topsl2_2['top10']['class']; ?>" style="width: <?php echo $topsl2_2['top10']['width']; ?>;">
			<jdoc:include type="modules" name="top10" style="gavickpro" />
		</div>
		<?php endif; ?>

		<?php if( $this->countModules('top11') ): ?>
		<div class="gk-box column gk-box<?php echo $topsl2_2['top11']['class']; ?>" style="width: <?php echo $topsl2_2['top11']['width']; ?>;">
			<jdoc:include type="modules" name="top11" style="gavickpro" />
		</div>
		<?php endif; ?>

		<?php if( $this->countModules('top12') ): ?>
		<div class="gk-box column gk-box<?php echo $topsl2_2['top12']['class']; ?>" style="width: <?php echo $topsl2_2['top12']['width']; ?>;">
			<jdoc:include type="modules" name="top12" style="gavickpro" />
		</div>
		<?php endif; ?>

	<?php if($this->countModules('top7 + top8 + top9') && $this->countModules('top10 + top11 + top12')) : ?>
		</div>
	</div>
	<?php endif; ?>	
	
	<?php if($this->_tpl->params->get("css3") && $this->_tpl->params->get("topsl2_vtext") != '') : ?>
	<p class="vertical"><?php echo $this->_tpl->params->get("topsl2_vtext"); ?></p>
	<?php endif; ?>			
</div>
<?php endif; ?>

<?php if( $topsl3_1 || $topsl3_2 ) : ?>
<div id="gk-topsl3" class="clearfix">	
	<?php if( $this->countModules('top13 + top14 + top15') && $this->countModules('top16 + top17 + top18') ): ?>
	<div class="gk_top_half">
		<div>
	<?php endif; ?>
	
		<?php if( $this->countModules('top13') ): ?>
		<div class="gk-box column gk-box<?php echo $topsl3_1['top13']['class']; ?>" style="width: <?php echo $topsl3_1['top13']['width']; ?>;">
			<jdoc:include type="modules" name="top13" style="gavickpro" />
		</div>
		<?php endif; ?>
		<?php if( $this->countModules('top14') ): ?>
		<div class="gk-box column gk-box<?php echo $topsl3_1['top14']['class']; ?>" style="width: <?php echo $topsl3_1['top14']['width']; ?>;">
			<jdoc:include type="modules" name="top14" style="gavickpro" />
		</div>
		<?php endif; ?>
		<?php if( $this->countModules('top15') ): ?>
		<div class="gk-box column gk-box<?php echo $topsl3_1['top15']['class']; ?>" style="width: <?php echo $topsl3_1['top15']['width']; ?>;">
			<jdoc:include type="modules" name="top15" style="gavickpro" />
		</div>
		<?php endif; ?>
		
	
	<?php if( $this->countModules('top13 + top14 + top15') && $this->countModules('top16 + top17 + top18') ): ?>
		</div>
	</div>
	<?php endif; ?>

	<?php if( $this->countModules('top13 + top14 + top15') && $this->countModules('top16 + top17 + top18') ): ?>
	<div class="gk_top_half">
		<div>
	<?php endif; ?>
	
		<?php if( $this->countModules('top16') ): ?>
		<div class="gk-box column gk-box<?php echo $topsl3_2['top16']['class']; ?>" style="width: <?php echo $topsl3_2['top16']['width']; ?>;">
			<jdoc:include type="modules" name="top16" style="gavickpro" />
		</div>
		<?php endif; ?>
		<?php if( $this->countModules('top17') ): ?>
		<div class="gk-box column gk-box<?php echo $topsl3_2['top17']['class']; ?>" style="width: <?php echo $topsl3_2['top17']['width']; ?>;">
			<jdoc:include type="modules" name="top17" style="gavickpro" />
		</div>
		<?php endif; ?>
		<?php if( $this->countModules('top18') ): ?>
		<div class="gk-box column gk-box<?php echo $topsl3_2['top18']['class']; ?>" style="width: <?php echo $topsl3_2['top18']['width']; ?>;">
			<jdoc:include type="modules" name="top18" style="gavickpro" />
		</div>
		<?php endif; ?>
	
	<?php if( $this->countModules('top13 + top14 + top15') && $this->countModules('top16 + top17 + top18') ): ?>
		</div>
	</div>
	<?php endif; ?>	
	
	<?php if($this->_tpl->params->get("css3") && $this->_tpl->params->get("topsl2_vtext") != '') : ?>
	<p class="vertical"><?php echo $this->_tpl->params->get("topsl3_vtext"); ?></p>
	<?php endif; ?>		
</div>
<?php endif; ?>